from datetime import datetime
from dateutil.relativedelta import relativedelta
from dateutil.rrule import *

# 计算最后一个周五的日期
def demo_1():
    d = datetime.now()
    print(d)
    print(d + relativedelta(weekday=FR))
    print(d + relativedelta(weekday=FR(-1)))

if __name__ == '__main__':
    demo_1()
